projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdb2fcb
)
glarea: Avoid a crash
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 18 Jan 2018 00:48:33 +0000
(19:48 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 18 Jan 2018 00:48:33 +0000
(19:48 -0500)
We must only delete the texture if it is not NULL.
gtk/gtkglarea.c
patch
|
blob
|
history
diff --git
a/gtk/gtkglarea.c
b/gtk/gtkglarea.c
index efe4899cab589c9733c91447468816fa29f6f5ee..8e3cf4cc75bbf03198a1b4ccf046affc865b6382 100644
(file)
--- a/
gtk/gtkglarea.c
+++ b/
gtk/gtkglarea.c
@@
-601,8
+601,11
@@
gtk_gl_area_delete_textures (GtkGLArea *area)
{
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
- delete_one_texture (priv->texture);
- priv->texture = NULL;
+ if (priv->texture)
+ {
+ delete_one_texture (priv->texture);
+ priv->texture = NULL;
+ }
/* FIXME: we need to explicitly release all outstanding
* textures here, otherwise release_texture will get called